﻿@{
    ViewBag.Title = "SearchStar Home Page";
}

@section JavaScript
{
   <script type="text/javascript" src="@Url.Content("/Scripts/Custom.js")"></script>  
}

@using (Ajax.BeginForm("SearchArticles", "Home", 
    new AjaxOptions {
     InsertionMode=InsertionMode.Replace,
     HttpMethod="GET",
     OnFailure="searchFailed",     
     LoadingElementId="ajax-loader",
     UpdateTargetId = "textarea_article",               
}))
{
<h1>Search for Articles</h1>
    <input type="text" id="input_search" name="input_search"/><button id="button_search" value="search">Search</button>
<img id="ajax-loader" 
         src="@Url.Content("~/Content/Images/ajax-loader.gif")" 
         style="display:none"/>
    <br />
    <textarea id="textarea_article" readonly="readonly"></textarea>
}

<button onclick="GetArticles();">Get Articles</button>
<button onclick="GetExclusions();">Get Exclusions</button>
<div id="showlist"></div>
